package top.huntwolf.admin.dao;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.huntwolf.admin.common.enums.OrderStatus;
import top.huntwolf.admin.pojo.orderEntity.Order;

import java.util.List;

@Mapper
@Repository
public interface CMSOrderDao {

    /*更新一个*/
    int update(Order order);

    int updateStatus(String orderId, OrderStatus orderStatus);

    /*获取订单状态*/
    OrderStatus selectStatus(String orderId);

    /*联合查询order和order_book 获取除 address,pay_time,order_type之外的其他属性*/
    List<Order> selectAllOrder();

    List<Order> selectByStatus(OrderStatus orderStatus);
}
